Skip to content

Conversation

@adrian-prantl
Copy link

commit 1b1fed239062bda4551f5dea2a3544d2648b5f53
Author: Adrian Prantl <aprantl@apple.com>
Date:   Wed Oct 15 17:40:56 2025 -0700

    [LLDB] Remove Swift AST-based name translation from MTC
    
    The name translation only affects selectors and not classes, so it
    already isn't correct in all cases. The translation is implemented on
    top of SwiftASTContext, which is very expensive to start up and on top
    of that may fail if the compiler flags aren't all available.
    
    Right now the cost-benefit trade-off for this feature doesn't work
    out. We should look into reimplementing it on top of
    TypeSystemSwiftTypeRef::GetSwiftName() which uses the APINotes and
    ClangImporter's name translation engine to do the job.
    
    rdar://162496659

The name translation only affects selectors and not classes, so it
already isn't correct in all cases. The translation is implemented on
top of SwiftASTContext, which is very expensive to start up and on top
of that may fail if the compiler flags aren't all available.

Right now the cost-benefit trade-off for this feature doesn't work
out. We should look into reimplementing it on top of
TypeSystemSwiftTypeRef::GetSwiftName() which uses the APINotes and
ClangImporter's name translation engine to do the job.

rdar://162496659
(cherry picked from commit 1b1fed2)
@adrian-prantl adrian-prantl merged commit 077208e into swiftlang:next Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant